* Load data
use "$data/main_touse.dta", replace
/*hs some_college ba_or_more ///
inc_lmiddle inc_umiddle inc_high ///
female white ///
*/
eststo patience_ctb_trim_high: reg patience_ctb_trim_high ///
i.agegroup ///
i.educ ///
i.inc_group ///
i.female ///
i.white if ctb!=4 ///
, vce(robust)

eststo patience_sc_high: reg patience_sc_high ///
i.agegroup ///
i.educ ///
i.inc_group ///
i.female ///
i.white ///
, vce(robust)

eststo patience_self_high: reg patience_self_high ///
i.agegroup ///
i.educ ///
i.inc_group ///
i.female ///
i.white ///
, vce(robust)

* Plotting models with binary DV  
coefplot ///
( ///
patience_ctb_trim_high, ///
mcolor(black) ///
ciopts( lwidth(medium) lcolor(black)) ///
) ///
( ///
patience_sc_high, ///
mcolor(gs6) ///
ciopts( lwidth(medium) lcolor(gs6)) ///
) ///
( ///
patience_self_high, ///
mcolor(gs11)  ///
ciopts( lwidth(medium) lcolor(gs11)) ///
) ///
, graphregion(margin(l=10) fcolor(white) lcolor(white) ifcolor(white) ilcolor(white)) ///
msize(tiny) ///
headings(1.agegroups = "Age" 1.educ = "Education" 1.inc_group = "Income" 0.female = "Gender" 0.white = "Race" , labsize(vsmall) labcolor(gs5)) ///
omitted baselevels ///
xtitle("Change in Pr(Patient) in %-points", size(vsmall)) ///
legend(size(vsmall) order(2 "CTB" 4 "Staircase" 6 "Stated") row(1)) ///
xlabel(#10, labsize(vsmall)) ///
ylabel(, labsize(vsmall)) ///
yscale(noline) ///
grid(between glpattern(dot) glwidth(vvthin) glcolor(gs2)) ///
drop(_cons) xline(0, lpattern(solid) lwidth(vthin))  ///
coeflabels(, notick) ///
levels(95) 
graph export "$output/FigureA3.pdf", replace
*window manage close graph
